package com.lwlk.zdk.service.Task.impl;

import com.lwlk.zdk.mapper.pw.pwCheckTheDutyMessageMapper;
import com.lwlk.zdk.mapper.task.pwTaskMapper;
import com.lwlk.zdk.model.pw.pwCheckTheDutyMessage;
import com.lwlk.zdk.model.task.pwTask;
import com.lwlk.zdk.service.Task.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class TaskServiceImpl implements TaskService {


    @Autowired
    pwTaskMapper pwTaskMapper;

    @Override
    public int insertBach(pwTask pwTask) {

        int i =pwTaskMapper.insertSelective(pwTask);

        return i;
    }

    @Override
    public List<Map<String, Object>> selectCondition(String assessPeriod, String issueType, String assessObject,Integer platformIds,Integer uId) {
        return pwTaskMapper.selectCondition(assessPeriod,issueType,assessObject,platformIds,uId);
    }

    @Override
    public int update(pwTask pwTask) {
        int i =pwTaskMapper.updateByPrimaryKeySelective(pwTask);
        return i;
    }

    public pwTask selectAll(Integer id) {
        pwTask pwTask=pwTaskMapper.selectAll(id);
        return pwTask;
    }
}
